package yhao.infra.feature.qiniu.oss.type;

import yhao.infra.feature.qiniu.oss.QiniuOssConfig;

/**
 * 枚举定义W_weight_height，有水印宽、高
 * 枚举定义weight_height，无水印宽、高
 * @author yoara
 * <p> Created on 2019/3/22 </p>
 */
public enum QiniuImgCommonType implements QiniuImgType{
    W_NORMAL("-w",true, QiniuOssConfig.SIZE_UNDEF, QiniuOssConfig.SIZE_UNDEF),

    W_120_120("-w120x120",true,120,120),
    W_480_360("-w480x360",true,480,360),
    W_600_400("-w600x400",true,600,400),
    W_800_600("-w800x600",true,800,600),
    W_1200_900("-w1200x900",true,1200,900),

    _120_120("-120x120",false,120,120),
    _480_360("-480x360",false,480,360),
    _600_400("-600x400",false,600,400),
    _800_600("-800x600",false,800,600),
    _1200_900("-1200x900",false,1200,900),


    ;

    private String postfix;
    private boolean waterMark;
    private int weight;
    private int height;

    QiniuImgCommonType(String postfix, boolean waterMark, int weight, int height) {
        this.postfix = postfix;
        this.waterMark = waterMark;
        this.weight = weight;
        this.height = height;
    }

    public String getPostfix() {
        return postfix;
    }

    public boolean isWaterMark() {
        return waterMark;
    }

    public Integer getHeight() {
        return height;
    }

    public Integer getWeight() {
        return weight;
    }
}
